package com.xgimi.open.skill.datamanager.domain.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 槽位表
 * @TableName slot
 */
@TableName(value ="slot")
@Data
public class SlotDO implements Serializable {
    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * skill_version表外键
     */
    private Long skillVid;

    /**
     * word_stock表外键（关联词库）
     */
    private Long relyonWordStock;

    /**
     * 槽位名称
     */
    private String slotName;

    /**
     * 关联意图（意图名称列表）
     */
    private String relationIntent;

    /**
     * 创建人
     */
    private String createdBy;

    /**
     * 创建时间
     */
    private Date createdAt;

    /**
     * 更新人
     */
    private String updatedBy;

    /**
     * 更新时间
     */
    private Date updatedAt;

    /**
     * business业务id
     */
    private String businessId;

    /**
     * 数据版本
     */
    private Integer updateVersion;

    /**
     * 软删除状态标志（0：未删除，1：已删除，默认：0）
     */
    @TableLogic
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SlotDO other = (SlotDO) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getSkillVid() == null ? other.getSkillVid() == null : this.getSkillVid().equals(other.getSkillVid()))
            && (this.getRelyonWordStock() == null ? other.getRelyonWordStock() == null : this.getRelyonWordStock().equals(other.getRelyonWordStock()))
            && (this.getSlotName() == null ? other.getSlotName() == null : this.getSlotName().equals(other.getSlotName()))
            && (this.getRelationIntent() == null ? other.getRelationIntent() == null : this.getRelationIntent().equals(other.getRelationIntent()))
            && (this.getCreatedBy() == null ? other.getCreatedBy() == null : this.getCreatedBy().equals(other.getCreatedBy()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
            && (this.getUpdatedBy() == null ? other.getUpdatedBy() == null : this.getUpdatedBy().equals(other.getUpdatedBy()))
            && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSkillVid() == null) ? 0 : getSkillVid().hashCode());
        result = prime * result + ((getRelyonWordStock() == null) ? 0 : getRelyonWordStock().hashCode());
        result = prime * result + ((getSlotName() == null) ? 0 : getSlotName().hashCode());
        result = prime * result + ((getRelationIntent() == null) ? 0 : getRelationIntent().hashCode());
        result = prime * result + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        result = prime * result + ((getUpdatedBy() == null) ? 0 : getUpdatedBy().hashCode());
        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", skillVid=").append(skillVid);
        sb.append(", relyonWordStock=").append(relyonWordStock);
        sb.append(", slotName=").append(slotName);
        sb.append(", relationIntent=").append(relationIntent);
        sb.append(", createdBy=").append(createdBy);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedBy=").append(updatedBy);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}